package com.pacai.homework;

/**
 * @author pacai
 * @version 1.0
 */
public class HomeWork14 {
    public static void main(String[] args) {
        PassObject passObject = new PassObject();
        passObject.printAreas(new Circle1(1),5);
    }
}


class Circle1{
    private double radius;

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public Circle1(double radius){
        this.radius = radius;
    }

    public double area(){
        return Math.PI * radius * radius;
    }
}

class PassObject{
    public void printAreas(Circle1 c,int times){
        for (int i = 1; i <= times; i++) {
            c.setRadius(i);
            System.out.println(c.area());
        }

    }
}